In screw cutting control in an existing NC device, movement control is performed by constantly rotating a main spindle which holds a work piece, detecting passage of a main spindle within-single-revolution reference point (hereinafter referred to as a Z-phase) by the input of a Z-phase signal from an encoder mounted on the main spindle, and calculating a movement amount of a screw cutting spindle that is proportional to an instructed screw lead, with respect to a rotation amount of the main spindle from the Z-phase passage.
FIG. 8 illustrates an existing NC device in which such screw cutting control or the like is possible, and this NC device is constituted by a signal processing section 2, a display unit 14, a screen display processing section 15, a memory 16 that stores a processing program or the like, an analysis processing section 18, an interpolation processing section 8, a screw cutting control section 9, a main spindle synchronization control section 10, a synchronization tapping control section 11, a main spindle C-axis control section 12, an orientation/indexing control section 13, a main spindle control section 19, a main spindle motor 20, a main spindle encoder 21, a spindle control section 22, a servomotor 23, an encoder 24, a main spindle feed-back position counter 31 (hereinafter referred to as a main spindle FB position counter), a main spindle Z-phase counter 32, and so on.
The main spindle encoder 21 is a position detector that outputs a position pulse which is counted by rotations of a main spindle. Further, the main spindle encoder 21 outputs a Z-phase signal when a Z-phase passes through a sensor of a detector. The main spindle control section 19 accumulates the position pulse from the main spindle encoder 21 and creates the main spindle FB position counter 31, as shown in FIG. 10. In addition, the main spindle FB position counter 31 repeats accumulation of pulses and clearing. Also, when the Z-phase signal has been input, the main spindle FB position counter 31 is latched and the main spindle Z-phase counter is created. When the NC device executes a screw cutting command program, the screw cutting control section 9 awaits the starting of screw cutting block until the main spindle passes through the Z-phase, and controls the angle of the main spindle that starts screw cutting. In addition, a counter as mentioned herein unit data counted by a counter (not shown).
Specifically, Z-phase passage is recognized by a change in the value of the main spindle Z-phase counter 32 and a rotation amount of the main spindle at the first Z-phase passage is calculated from a difference between the main spindle FB position counter 31 and the main spindle Z-phase counter 32. Thereafter, a variation of the main spindle FB position counter 31 is accumulated and a rotation amount of the main spindle from the first Z-phase passage after a screw cutting command is calculated. A movement amount of a screw cutting spindle that is proportional to an instructed screw cutting lead is calculated with respect to the rotation amount of the main spindle from the Z-phase passage, and the interpolation processing section 8 controls a movement amount of a servomotor in synchronization with the rotation amount of the main spindle, thereby performing processing from a given angle of a work piece gripped by the main spindle, whereby screw cutting can be performed.
Also, the main spindle synchronization control section 10 synchronously controls speeds and phases of two opposed main spindles. The synchronization tapping control section 11 synchronously controls the main spindle that rotates a tapping tool, and a tapping spindle, thereby performing tapping processing. Also, before the tapping processing, it is also possible to perform zero return of the main spindle to a Z-phase position, thereby performing phase matching.
Also, the main spindle C-axis control section 12 switches the main spindle to a C-axis that performs position control, and performs movement control with respect to a command of positioning or the like. In addition, when switching the main spindle to C-axis control, a coordinate system of the C-axis is established by performing zero return of the main spindle to the Z-phase position.
Also, the orientation/indexing control section 13 performs positioning of the main spindle at a given command angle by an orientation/indexing command.
In addition, in the case of performing the respective operations of main spindle synchronization control, synchronization tapping control, C-axis control, and orientation/indexing control, the operations are performed by performing setting or command of an angle matching a phase, by parameters or a processing program.
Also, the existing NC device can give instructions of a shift angle of screw cutting by the processing program 17. FIG. 9 illustrates a configuration particularly about the screw cutting control section 9 in the NC device of FIG. 8. The screw cutting control section 9 of FIG. 9 recognizes Z-phase passage by a change in the value of the main spindle Z-phase counter 32 and calculates a rotation amount of the main spindle from the Z-phase passage, from a difference between the main spindle FB position counter 31 and the main spindle Z-phase counter 32. The phase shift control section 7 subtracts the rotation amount of the main spindle from the Z-phase passage, from a shift angle amount of screw cutting instructed by the processing program 17 and calculates a rotation amount of the main spindle from a point of time when the shift angle amount reaches 0. The interpolation processing section 8 calculates a movement amount of a screw cutting spindle that is proportional to the instructed screw cutting lead, with respect to the rotation amount of the main spindle from a point of time when the shift angle amount reaches 0, and performs movement control in synchronization with the rotation amount of the main spindle, thereby processing a work piece gripped by the main spindle from a shift angle of screw cutting instructed by the program, whereby screw cutting can be performed.
In addition, also for an angle of phase matching of main spindle synchronization control that synchronously controls rotation of opposed main spindles, phase matching of synchronization tapping that synchronously controls rotation of the main spindle and movement of the tapping spindle, main spindle C-axis control that performs positioning, or orientation/indexing control, similarly, it is possible to perform calculation of a phase matching angle or the like on the basis of the Z-phase signal.
Also, in the case of control, for example, a machine having a configuration shown in FIG. 4 by the NC device having the above-described configuration, there is a case where a starting angle of screw cutting is different due to the disposition of the main spindle that grips a work piece on which processing is performed, and a tool. In addition, the machine having the configuration shown in FIG. 4 is made such that the disposition of the main spindle is alternately changed between a main spindle station A 57 and a main spindle station B 58 by the rotation of a main spindle station pivot spindle 59 and simultaneous processing of primary processing at the main spindle station A 57 and secondary processing at the main spindle station B 58 can be performed while delivering a work piece between the main spindle station A and the main spindle station B.
In a machine having such a configuration, since disposition of a main spindle station is switched by the movement of the machine, there is a case where the relationship between a contact angle of a blade edge of a tool and a main spindle angle at which a sensor of an encoder is mounted are different due to the disposition of the main spindle station. In the case of the machine having the configuration shown in FIG. 4, with the disposition of the main spindle station A, an encoder sensor is located at an upper portion. However, with the disposition of the main spindle station B, the encoder sensor is located at a lower portion. If processing is performed by the tools disposed above the respective main spindle stations, in the main spindle station A, screw cutting is started when the Z-phase passes an upper portion of the main spindle, and in the main spindle station B, screw cutting is started when the Z-phase passes a lower portion of the main spindle, whereby a difference arises in the paths of a screw thread which the blade edge of the tool traces.
For this reason, in a case where a screw thread processed at the main spindle station A is reprocessed at the main spindle station B, a screw thread processed at the main spindle station A of FIG. 4 is reprocessed at the main spindle station B by giving instructions of a shift angle (in the case of this machine, 180°) of screw cutting corresponding to the main spindle station in which the main spindle that performs processing is disposed, by the processing program.
Also, as another background art, there is proposed an art in which when performing reprocessing of a screw or a gear, a position that generates a single-revolution signal is shifted by a gear-meshing position by a configuration made such that if a gear-meshing completion signal is generated in a gear-meshing (in the case of reprocessing of a screw, gear-meshing of a screw cutting tool and an already processed screw) completion state, a reversible counter for single-revolution signal (Z-phase signal) generation is reset to be a 0 position by the signal and thereafter, every time the reversible counter counts 4096 pulses, it is returned to a 0 position, thereby generating a single-revolution signal (refer to Patent Document 1).
[Patent Document 1] Japanese Unexamined Patent Application Publication No. S59-232750-A (the 3rd line of the top right column on Page 2 to the 4th line of the top left column on Page 5, and FIGS. 2 and 3)